home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Answers 2002 January
/
PC Answers January 2002.7z
/
PC Answers January 2002.bin
/
graphics
/
freepixl
/
_SETUP.1
/
dlgbased.pxl
< prev
next >
Wrap
Text File
|
2000-04-03
|
4KB
|
122 lines
{ Filename : dlgbased.pxl
Purpose : Demonstrate buttons and edit controls are used in client area
Date : March 31, 2000
Author : Stewart DIBBS, VYSOR
History:
Version : 4.40 RELEASE
Update :
Date :
--------------------------------------------------------------------------}
Initialize: {only one instance allowed}
UseCoordinates(PIXEL)
Title$ = "PiXCL Dialog-Style Application"
WinExist(Title$,Res)
If Res = 0 Then Goto One_Instance
Beep
WinSetActive(Title$,Res)
WinShow(Title$,RESTORE,Res)
End
One_Instance:
UseCaption(Title$) {change the title}
WinLocate(Title$,20,174,627,496,Res)
UseBackground(TRANSPARENT,192,192,192)
WinShow(Title$,TOPMOST,Res)
DrawBackGround
DirGet(SourceDir$) {used later for library function calls}
InfoMenu(REMOVE)
WaitInput(100)
SetMenu()
StatusWindow(ENABLE,BOTTOM,2,200,-1,0,0)
DrawStatusWinText(0,"Ready")
ChangeMenuItem("&StatusBar",CHECK,SBRes)
MakeEditControls:
Drawbackground
UseFont("Arial",7,17,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
{WaitInput(100) let windows catch up...common with Button}
Edit$ = "124"
EditM$ = "more blah"
Num1$ = "196"
Num2$ = "199"
SetEditControl(10, 30,125, 55,STRING,0,0,EditM$,
10, 60,125, 85,NUMBER,10,-10,Num1$,
10, 90,100, 115,NUMBERUD,100,0,Edit$,
10,120,100,145,NUMBERUD,-10,-100,Num2$,
10,150,125,175,STRING,0,0,EditM$)
Cbox1$ = "ComboBox#1"
Cbox2$ = "ComboBox#2"
Cbox3$ = "ComboBox#3"
Delimiter$ = "|"
List1$ = "CBarg#1|CBarg#2|CBarg#3|CBarg#4|CBarg#5|CBarg#6|CBarg#7|CBarg#8"
List2$ = "CBarg#1|CBarg#2|CBarg#3|CBarg#4|"
ComboBox(185,120,300,255,DROPDOWN, List1$,Delimiter$,Cbox1$,
310,120,425,255,DROPDOWNLIST, List2$,Delimiter$,Cbox2$,
435,120,550,255,SIMPLE,List1$, Delimiter$,CBox3$)
Button(240, 10,340, 40,PUSH,"&Btn1",EndMakeEdit,
240,50,340,80,PUSH,"&Help",Concept,
360,50,460,80,PUSH,"&Done",EndMakeEdit,
5,10,170,190,GROUP,"Edit Control Styles",EndMakeEdit,
175,95,560,260,GROUP,"Dropdown ------- DropdownList ------ Simple Style",EndMakeEdit)
UseFont("Arial",11,23,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
DrawShadowText(200,160,"Combobox Styles",255,255,255,1)
UseFont("Arial",7,17,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
Image$ = SourceDir$ + "\bitmap.bmp"
DrawSizedBitmap(45,200,150,260,Image$)
Goto Wait_for_Input
EndMakeEdit:
DrawBackground {now restore the buttons was still want}
SetEditControl()
Button( 360,50,460,80,PUSH,"&Exit",Terminate,
175,95,560,260,GROUP,"Dropdown ------- DropdownList ------ Simple Style",EndMakeEdit)
UseFont("Arial",7,17,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
WaitInput(1)
DrawText(10,10,Edit$)
DrawText(10,35,Num1$)
DrawText(10,60,EditM$)
DrawText(10,85,Num2$)
Goto Wait_for_Input
Wait_for_Input:
WaitInput()
Terminate:
End
Concept:
MessageBox(OK,1,INFORMATION,
"A PiXCL application is often better presented to the user as a
dialog based program with edit controls, comboboxes, push buttons,
radio buttons, check boxes and group boxes. This program shows
how the controls might be used.
See also the DialogBox command and the Helper applications for details
on constructing custom dialogs boxes.",
"PiXCL Dialog Style Applications",Res)
Goto Wait_for_Input
About:
AboutUser("PiXCL Dialog-Style Application", { or substitute Title$}
"Two lines of text goes here e.g. Application function.",
"Four Lines of additional information goes here, perhaps contact information and Web addresses")
Goto Wait_for_Input